unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, cxControls, cxSSheet;

type
  TForm1 = class(TForm)
    cxSpreadSheetBook1: TcxSpreadSheetBook;
    MainMenu1: TMainMenu;
    N1: TMenuItem;
    procedure N1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.N1Click(Sender: TObject);
var
  ACell:TcxSSCellObject;
  I:Integer;
begin
  for i:=0 to 59 do
  begin
    ACell:=cxSpreadSheetBook1.ActiveSheet.GetCellObject(2,I);
    ACell.Text:=IntToStr(I);
    ACell.Style.Brush.BackgroundColor:=I;
    ACell.Free;
  end;
end;

end.
